--黑色迷雾
local heisemiwu = fk.CreateSkill {
    name = "mcdh_heisemiwu",
}

local U = require "packages/utility/utility"
local lib = require "packages/mcdh/lib"

heisemiwu:addEffect(fk.EventPhaseStart,{
    can_trigger = function(self, event, target, player, data)
        return player:hasSkill(self) and player:getHandcardNum() == 1 and target ~= player and not target:isNude() and target.phase == Player.Finish
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        local id =room:askForCardChosen(player, target, "he", self.name, "#heisemiwu:"..target.id)
        local card = Fk:getCardById(id)
        room:moveCardTo(card, Card.PlayerHand, player, fk.ReasonPrey, self.name, nil,   false, player.id)
        room:askToUseCard(player,{skill_name=self.name,pattern=".|.|.|.|.|equip",prompt = "#heisemiwu-use"})
    end
})

Fk:loadTranslationTable {
    ["mcdh_heisemiwu"] = "黑色迷雾",
    [":mcdh_heisemiwu"] = "其他角色的结束阶段，若你手牌数为1，你可以获得其一张牌。若此牌为装备牌，你可以使用一张装备牌。",
    ["#heisemiwu"] = "黑色迷雾:获得 %src 一张牌",
    ["#heisemiwu-use"] = "黑色迷雾：你可以使用一张装备牌",
}

return heisemiwu